import type { TableColumn } from '@/components/core/dynamic-table';

export type TableListItem = API.UserListPageResultItem;
export type TableColumnItem = TableColumn<TableListItem>;

const operationParams = [
  {
    label: '售前',
    value: 1,
  },
  {
    label: '立项',
    value: 2,
  },
  {
    label: '执行中',
    value: 3,
  },
  {
    label: '已完成',
    value: 4,
  },
];
const operationParams2 = [
  {
    label: '领用申请',
    value: 1,
  },
  {
    label: '退还申请',
    value: 2,
  },
];

export const baseColumns: TableColumn[] = [
  {
    title: '关键字',
    align: 'left',
    dataIndex: 'keyword',
    hideInTable: true,
    formItemProps: {
      labelWidth: 55,
      componentProps: () => {
        return {
          placeholder: '可输入合同编号、项目编号/名称搜索',
          disabledLabelWidth: true,
        };
      },
    },
  },
  {
    title: '监测周期',
    dataIndex: 'time',
    hideInTable: true,
    formItemProps: {
      component: 'RangePicker',
      componentProps: () => {
        return {
          format: 'YYYY/MM/DD HH:mm:ss',
          valueFormat: 'YYYY/MM/DD HH:mm:ss',
          showTime: true,
        };
      },
    },
  },
  {
    title: '合同编号',
    align: 'left',
    dataIndex: 'userNum',
    hideInSearch: true,
  },

  {
    title: '关联项目编号',
    align: 'left',
    dataIndex: 'userLogin',
    hideInSearch: true,
  },
  {
    title: '关联项目名称',
    align: 'left',
    dataIndex: 'userName',
    hideInSearch: true,
  },
  {
    title: '监测委托方',
    align: 'left',
    dataIndex: 'action',
    hideInSearch: true,
  },

  {
    title: '签订日期',
    align: 'left',
    dataIndex: 'operationTime',
    hideInSearch: true,
  },
  {
    title: '监测周期',
    align: 'left',
    dataIndex: 'operationName',
    hideInSearch: true,
  },
  {
    title: '合同金额',
    align: 'left',
    dataIndex: 'operationNum',
    hideInSearch: true,
  },
];
